<?php


namespace App\Controller\Admin;


use App\Controller\AbstractController;
use App\Request\Admin\PercentageExportRequest;
use App\Service\Admin\PercentageService;
use Hyperf\Di\Annotation\Inject;

class PercentageController extends AbstractController
{
    /**
     * @Inject()
     * @var PercentageService
     */
    protected $percentageService;


    /**
     * 平台提成导出
     * @param PercentageExportRequest $request
     * @return \Psr\Http\Message\ResponseInterface
     * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
     */
    public function percentageExport(PercentageExportRequest $request)
    {
        $validated = $request->validated();
        return $this->percentageService->percentageExport($validated);
    }
}